#include <iostream>

int main(int argc, char const *argv[])
{
    using namespace std;
    // define a pointer
    int a = 10;

    int *p;

    p = &a;

    cout << "&a = " << &a << endl;
    cout << "p = " << p << endl;
    cout << "*p = " << *p << endl;

    *p = 5;
    cout << "a = " << a << endl;
    cout << "*p = " << *p << endl;
    cout << "&a = " << &a << endl;
    cout << "p = " << p << endl;

    return 0;
}
